package cn.admin.controller;

import cn.admin.config.key.StatusCode;
import cn.admin.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: 毛苏宇
 * @Description: You can do it!
 * @Date: Create in 9:37 2019/3/26
 */
@Controller
@RequestMapping("/vip")
public class VipController {

    @Autowired private VipService vipService;


    @PostMapping("/modifyPrice")
    @ResponseBody
    public String modifyVipPrice(@RequestParam("vip_price") double vip_price){
        boolean b = vipService.modifyVipPrice(vip_price);
        if (b){
            return StatusCode.STATUS_SUCCESS;
        }else{
            return StatusCode.STATUS_FAIL;
        }
    }


}
